package com.chuhe.starry.controller;

import com.chuhe.common.domain.entity.UserInfo;
import com.chuhe.common.domain.entity.UserInfoBeauty;
import com.chuhe.common.domain.query.PaginationResultVO;
import com.chuhe.common.domain.vo.req.AdminAddBeautyAccountReq;
import com.chuhe.common.domain.vo.req.AdminLoadBeautyAccountReq;
import com.chuhe.common.domain.vo.resp.ApiResult;
import com.chuhe.starry.service.UserInfoBeautyService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.constraints.NotNull;

/**
 * @Author: 楚河
 * @Date: 2025年05月18日11:06
 */
@RestController()
@RequestMapping("/admin")
@Api(value = "靓号管理接口", tags = "靓号管理相关API", description = "靓号管理API")
public class AdminUserInfoBeautyController {
    @Autowired
    private UserInfoBeautyService userInfoBeautyService;

    @RequestMapping("/loadBeautyAccountList")
    @ApiOperation("查询所有靓号")
    public ApiResult<PaginationResultVO<UserInfoBeauty>> loadBeautyAccountList(AdminLoadBeautyAccountReq req){
        return ApiResult.success(userInfoBeautyService.loadBeautyAccountList(req));
    }

    @RequestMapping("/saveBeautAccount")
    @ApiOperation("新增靓号")
    public ApiResult<?> saveBeautyAccount(AdminAddBeautyAccountReq req){
        userInfoBeautyService.saveBeautyAccount(req);
        return ApiResult.success(null);
    }

    @RequestMapping("/delBeautAccount")
    @ApiOperation("新增靓号")
    public ApiResult<?> delBeautAccount(@NotNull Integer id){
        return ApiResult.success(userInfoBeautyService.delBeautAccount(id));
    }




}
